/**
 *
 */
package info.san.efd.dl;

import java.io.File;
import java.io.IOException;
import java.util.Properties;

import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;

/**
 * Class that monitore download and project elements.
 *
 * @author ANGELLOZ-NICOUD Sébastien
 *
 * @version 1.0
 */
public class Downloader {

    private Options options;

    private File projectDir;

    private File installDir;

    public void run(String[] args) throws IOException {
        initOptions();
        readProperties();




    }

    private void initOptions() {
        this.options = new Options();
        this.options.addOption("prj", true, "Project name.");
        this.options.addOption("proxyurl", true, "Proxy URL.");
        this.options.addOption("proxyport", true, "Proxy port.");
        this.options.addOption("plugin", true, "Use a particular plugin.");
        this.options.addOption("url", true, "Url for downloading files.");
        this.options.addOption("extinc", true, "Downloading only following extension file (comma separated).");
        this.options.addOption("extexcl", true, "Excluding theses following extension file (comma separated).");
    }

    private void printHelp() {
        HelpFormatter format = new HelpFormatter();
        format.printHelp("efd", this.options);
    }

    private void readProperties() throws IOException {
        Properties prop = new Properties();
        prop.load(Downloader.class.getResourceAsStream("config"));


    }

}
